<template>
	<view>
		<comptest
			:msg="pmsg"
			@myEven="getMsg"
		></comptest>
		<view>子组件传过来的值：{{num}}</view>
	</view>
</template>

<script>
	import comptest from '../../components/component.vue'
	
	export default {
		data() {
			return {
				pmsg: 'hello',
				num: 0
			}
		},
		methods: {
			getMsg(e) {
				console.log(e)
				this.num = e
			}
		},
		components: {
			comptest: comptest
		}
	}
</script>

<style>

</style>
